import request from "../utils/request";

/**
 * 登录
 * @param     userName
 * @param     pwd
 */
export const loginRequest = (userName, pwd) => {
    return request.post(`/UserInfo/Login?userName=${userName}&pwd=${pwd}`)
}

/**
 * 根据 id 获取用户信息
 * @param     id
 */
export const getUserInfoById = (params) => {
    return request.get("/UserInfo/GetUserInfoById", {params})
}

/**
 * 获取场景列表（登录页展示栏）
 * @param     senceId
 */
export const getSenceViewList = (params) => {
    return request.get("/Sence/GetSenceViewList", {params})
}

/**
 * 获取该用户的场景（登录页展示栏）
 * @param     userId
 */
export const getUserSence = (params) => {
    return request.get("/Sence/GetUserSence", {params})
}

/**
 * 获取该用户的场景（登录页展示栏）
 * @param     userId
 */
export const loginByRole = (params) => {
    return request.get("/UserInfo/LoginByRole", {params})
}

/**
 * 根据 场景id 查询场景
 * @param     userId
 */
export const getSenceById = (params) => {
    return request.get("/Sence/GetSenceById", {params})
}